<template>
    <div>
        {{ count }}
        <br />
        <button @click="handlClick">click</button>
    </div>
</template>

<script>
export default {
    props: {
        count: {
            type: Number,
            required: true,
        },
        msg: {
            type: String,
            required: true,
        },
    },
    setup (props, context) {
        const { emit } = context;
        const handlClick = () => {
            emit('update:count', props.count + 1);
            emit('update:msg', props.msg + props.count);
        };
        return {
            handlClick,
        };
    },
};
</script>

<style>

</style>
